package com.zzyl.mapper;


import com.zzyl.entity.NursingPlan;
import com.zzyl.vo.NursingPlanPageVo;
import com.zzyl.vo.NursingPlanVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author 11010
* @description 针对表【nursing_plan(护理计划表)】的数据库操作Mapper
* @createDate 2024-07-23 10:14:47
* @Entity com.zzyl.entity.NursingPlan
*/
@Mapper
public interface NursingPlanMapper {

    List<NursingPlanVo> getAll();

    void add(NursingPlan nursingPlan);

    @Select("select * from nursing_plan where plan_name = #{planName}")
    NursingPlan getByName(String planName);

    List<NursingPlanPageVo> search(String name, Integer status);

    @Select("select * from nursing_plan where id = #{id}")
    NursingPlan getById(Integer id);

    void update(NursingPlan nursingPlan);

    @Delete("delete from nursing_plan where id = #{id}")
    void delete(Integer id);

    List<NursingPlan> getByIds(@Param("ids") List<Integer> collect);
}




